<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>01-初见flex</title>
  <style>
    div {
      display: flex;
      width: 80%;
      height: 300px;
      margin: 0 auto;
      background-color: pink;
    }

    div span {
      /* width: 150px; */
      /* flex布局好处 */
      /* 1. span标签为行内元素，使用flex布局后就可以设置高度，盒子边距等功能 */
      /* 2. 可以指定盒子分为几等分，实现弹性布局 */
      flex: 1;
      height: 150px;
      margin-right: 10px;
      background: skyblue;
    }
  </style>
</head>

<body>

  <div>
    <span>1</span>
    <span>2</span>
    <span>3</span>
  </div>

</body>

</html>